<?php


namespace app\server\controller;

use app\server\model\CouponServers as CSM;
use app\index\controller\Base;
class Couponservers extends Base
{
    public function get()
    {
        $data = $this->request->param();
        $res = new CSM();
        $d=$res
            ->where($data['field'],$data['op'],$data['value'])
            ->order($data['order_by'],'desc')
            ->select();
        return $d;
    }
    public function update()
    {
        $data = $this->request->param();
        $res = new CSM();
        return $res->updateModel($data);
    }
    public function delete(){
        $data = $this->request->param();
        $res = new CSM();
        return $res->deleteModel($data);
    }
    public function save(){
        $res = new CSM();
        $data = $this->request->param();
        $res->saveModel($data);
    }
}